package Test1;

/**
 * @Author admin
 * @Date 2019/3/13 9:22
 */
public class Cfx {
    private int chang;
    private int kuan;
    int zc;
    int mj;
    public Cfx() {
    }

    public Cfx(int chang, int kuan) {
        this.chang = chang;
        this.kuan = kuan;
    }

    public void setChang(int chang) {
        this.chang = chang;
    }

    public void setKuan(int kuan) {
        this.kuan = kuan;
    }

    public int getChang() {
        return chang;
    }

    public int getKuan() {
        return kuan;
    }
    void zhouchang(int chang,int kuan){
        zc=2*chang+2*kuan;

    }
    void mianji(int chang,int kuan){

        mj=chang*kuan;
    }
    void output(){
        System.out.println("面积为"+mj+"周长为"+zc);
    }
}
